package chapter04.Example24_31.Example25;

import static chapter04.Example24_31.Example24.divide;

public class Example25 {
    public static int main(String[] args) {
        try {
            int result = divide(4,0);
            System.out.println(result);
        }catch (Exception e){
            System.out.println("捕获的异常信息为:"+e.getMessage());
        }
        public static int divide(int x,int y){
            int result = x/y;
            return result;
        }
    }
}
